﻿using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Ruanmou.Comm;
using Ruanmou.Model;
using System;
using System.Collections.Generic;
using System.Text;
namespace Ruanmou.Context
{
    public class RuanmouContext : DbContext
    {
        private IConfiguration _IConfiguration = null;
        public RuanmouContext(IConfiguration configuration)
        {
            this._IConfiguration = configuration;
        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            //读取配置文件
            optionsBuilder.UseSqlServer(ConfigurationHelper.DbConnection);
        }
        public virtual DbSet<TextModel> TextModels { get; set; }
    }
}
